A known image forming apparatus includes a light emitting element, a light receiving element, and a transparent member covering a light emitting side of the light emitting element and a light receiving side of the light receiving element. The transparent member is detachably attached to a light path forming member.
A user or a maintenance operator can remove the transparent member from the light path forming member by moving the transparent member toward the front side in parallel to the light path forming member.
As the transparent member is configured to be removed from the light path forming member by parallel movement, the transparent member may come off unintentionally.